package com;

import com.Tokiu.Dao.BaoDao;
import com.Tokiu.Dao.BaoDaoInter;
import com.Tokiu.config.SpringConfirguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App1 {
    public static void main(String[] args) throws InterruptedException {
        //加载配置文件获取容器对象
        AnnotationConfigApplicationContext ctx=new AnnotationConfigApplicationContext(SpringConfirguration.class);

        //获取Bean类是一定要获取接口类
        BaoDaoInter bean = ctx.getBean(BaoDaoInter.class);

        bean.save();

        ctx.close();

    }
}
